<?php

namespace WoXuanWang\MemberOrder\Requests;

use Illuminate\Foundation\Http\FormRequest;
use WoXuanWang\MemberOrder\Models\MemberOrder;

class CreateMemberOrderRequest extends FormRequest
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        MemberOrder::$rules;
        $rules['amount']='required';
        $rules['status'] = 'required';
        $rules['start_at']='required';
        $rules['end_at']='required';
        return $rules;
    }

    public function attributes()
    {
        return [
            'amount' => '金额',
            'status' => '状态',
            'start_at' => '生效日期',
            'end_at' => '截止日期'
        ];
    }
}
